#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int zxzfc(char*s)
{
	int i, k, j, m;
	k = 1;
	j = i = strlen(s);
	m = *s;
	while (i > 0)
	{
		s[j - i] = s[j - i + 1];
		i--;
	}
	s[j-1] = m;
	return 0;
}

int xuanzhuan(char* s, char* b)
{
	int i = strlen(s);
	int j = strlen(b);
	if (i != j)
		return 0;

	for (; i > 0; i--)
	{
		zxzfc(s);
		int k;
		for (k = 0; k < j; k++)
		{
			if (s[k] == b[k])
				;
			else
				break;
		}
		if (k == j)
			return 1;
	}
	return 0;
}


int mainpdxzh()
{

	char s1 [] = {"AABCD"};
	char s2 [] = {"BCDAA"};
	char s11 [] = {"abcd"};
	char s22 [] = {"ACBD"};
	printf("%d ", xuanzhuan(s1,s2));
	printf("%d ", xuanzhuan(s11,s22));
	printf("\n");
	return 0;
}